<script type="text/javascript" language="javascript">
$(document).ready(function()
{
    $('#menu_left ul li a.parent').click(showChildMenu);
}
);

function showChildMenu()
{
    //alert("show menu");
    var id=$(this).parent().attr("id");
    var src=$("#"+id+" a:first img").attr("src");
    if(src!=null)
    {
        var index=src.lastIndexOf("/");
        if(index >=0)
        {
            var filename=src.substring(index+1);
            var path=src.substr(0,index+1);
            
            if(filename=="plus.gif")
            {
                filename="minus.gif";
                $("#"+id+" a:first img").attr("src",path+filename);
                $("#"+id+" ul").css("display","block");
            }
            else
            {
                filename="plus.gif";
                $("#"+id+" a:first img").attr("src",path+filename);
                $("#"+id+"  ul").css("display","none");
            }
        }
    }
}
</script>
<?php $baseURL = Zend_Controller_Front::getInstance()->getBaseUrl(); ?>
<div id="menu_left">
    <span>&nbsp;&nbsp;Chào&nbsp; <?php echo 'admin' ?></span>
    <ul>
        <li id="menu1">
            <a class="parent">
                <img alt="" src="<?php echo $baseURL ."/images/plus.gif" ?>"/>
                Quản lý người dùng
            </a>
            <ul>
                <li>
                    <a href="#">
                        <img alt="" src="<?php echo $baseURL ."/images/list.gif" ?>"/>
                        Thay đổi mật khẩu
                    </a>
                </li>
                <li>
                    <a href="#">
                        <img alt="" src="<?php echo $baseURL ."/images/list.gif" ?>"/>
                        Chức năng
                    </a>
                </li>
            </ul>
        </li>
        <li id="menu2">
            <a class="parent">
                <img alt="" src="<?php echo $baseURL ."/images/plus.gif" ?>"/>
                Quản lý sách
            </a>
            <ul>
                <li>
                    <a href="#">
                        <img alt="" src="<?php echo $baseURL ."/images/list.gif" ?>"/>
                        Chức năng
                    </a>
                </li>
                <li>
                    <a href="<?php echo $baseURL ."/admin/bookcategory/index" ?>" target="main">
                        <img alt="" src="<?php echo $baseURL ."/images/list.gif" ?>"/>
                        Danh mục sách
                    </a>
                </li>
                <li>
                    <a href="<?php echo $baseURL ."/admin/book/listbook" ?>" target="main">
                        <img alt="" src="<?php echo $baseURL ."/images/list.gif" ?>"/>
                        Sách trong kho
                    </a>
                </li>
                <li>
                    <a href="#">
                        <img alt="" src="<?php echo $baseURL ."/images/list.gif" ?>"/>
                        Tác giả
                    </a>
                </li>
                <li>
                    <a href="<?php echo $baseURL ."/admin/book/index" ?>" target="main">
                        <img alt="" src="<?php echo $baseURL ."/images/list.gif" ?>"/>
                        Thêm sách mới
                    </a>
                </li>
                 <!--<li>
                    <a href="<?php echo $baseURL ."/admin/book/createindex" ?>" target="main">
                        <img alt="" src="<?php echo $baseURL ."/images/list.gif" ?>"/>
                        Tạo chỉ mục tìm kiếm
                    </a>
                </li>-->
            </ul>
        </li>
        <li id="menu3">
            <a  class="parent">
                <img alt="" src="<?php echo $baseURL ."/images/plus.gif" ?>"/>
                Quản lý đơn hàng
            </a>
            <ul>
                <li>
                    <a href="<?php echo $baseURL ."/admin/order/index"; ?>" target="main">
                        <img alt="" src="<?php echo $baseURL ."/images/list.gif" ?>"/>
                        Đơn hàng mới
                    </a>
                </li>
                <li>
                    <a href="#">
                        <img alt="" src="<?php echo $baseURL ."/images/list.gif" ?>"/>
                        Đơn hàng đã hoàn tất
                    </a>
                </li>
            </ul>
        </li>
        <li id="menu4">
            <a  class="parent">
                <img alt="" src="<?php echo $baseURL ."/images/plus.gif" ?>"/>
                Cộng đồng
            </a>
            <ul>
                <li>
                    <a href="#">
                        <img alt="" src="<?php echo $baseURL ."/images/list.gif" ?>"/>
                        Chuyên mục
                    </a>
                </li>
                <li>
                    <a href="#">
                        <img alt="" src="<?php echo $baseURL ."/images/list.gif" ?>"/>
                        Bài viết
                    </a>
                </li>
                <li>
                    <a href="#">
                        <img alt="" src="<?php echo $baseURL ."/images/list.gif" ?>"/>
                        Sự kiện
                    </a>
                </li>
                <li>
                    <a href="#">
                        <img alt="" src="<?php echo $baseURL ."/images/list.gif" ?>"/>
                        Cảm nhận
                    </a>
                </li>
            </ul>
        </li>
    </ul>
</div>